home *** CD-ROM | disk | FTP | other *** search
/ Macwelt 4 / Macwelt DVD 4.cdr / Entwickler / Mac-OS X / Pantomime / Source / parsarpmbox.c < prev    next >
MacBinary  |  2001-11-21  |  12.0 KB  |  [□□□□/□□□□]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
1% dexvert MacBinary (archive/macBinary) fallback Supported
100% file MacBinary II, inited, Wed Nov 21 12:25:35 2001, modified Wed Nov 21 12:25:35 2001, 11714 bytes "parsarpmbox.c" , at 0x2e42 286 bytes resource default (weak)
99% file data default
100% TrID MacBinary 2 default (weak)
100% dearkID deark: macbinary default
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[□□□□]
macFileCreator[□□□□]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 70 61 72 73 61 72 | 70 6d 62 6f 78 2e 63 00 |..parsar|pmbox.c.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 01 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 2d c2 00 | 00 01 1e b8 21 94 0f b8 |.....-..|....!...|
|00000060| 21 94 0f 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |!.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 6c 5b 00 00 |........|....l[..|
|00000080| 2f 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/*******|********|
|00000090| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000d0| 0a 20 2a 20 20 54 68 65 | 20 45 6c 6d 20 4d 61 69 |. * The| Elm Mai|
|000000e0| 6c 20 53 79 73 74 65 6d | 20 20 2d 20 20 24 52 65 |l System| - $Re|
|000000f0| 76 69 73 69 6f 6e 3a 20 | 31 2e 31 2e 31 2e 31 20 |vision: |1.1.1.1 |
|00000100| 24 20 20 20 24 53 74 61 | 74 65 3a 20 45 78 70 20 |$ $Sta|te: Exp |
|00000110| 24 0a 20 2a 0a 20 2a 20 | 20 20 20 20 20 20 20 20 |$. *. * | |
|00000120| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 43 6f 70 | | Cop|
|00000130| 79 72 69 67 68 74 20 28 | 63 29 20 31 39 38 38 2d |yright (|c) 1988-|
|00000140| 31 39 39 35 20 55 53 45 | 4e 45 54 20 43 6f 6d 6d |1995 USE|NET Comm|
|00000150| 75 6e 69 74 79 20 54 72 | 75 73 74 0a 20 2a 09 09 |unity Tr|ust. *..|
|00000160| 09 43 6f 70 79 72 69 67 | 68 74 20 28 63 29 20 31 |.Copyrig|ht (c) 1|
|00000170| 39 38 36 2c 31 39 38 37 | 20 44 61 76 65 20 54 61 |986,1987| Dave Ta|
|00000180| 79 6c 6f 72 0a 20 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |ylor. **|********|
|00000190| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000001a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000001b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000001c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000001d0| 2a 2a 2a 2a 2a 0a 20 2a | 20 42 75 67 20 72 65 70 |*****. *| Bug rep|
|000001e0| 6f 72 74 73 2c 20 70 61 | 74 63 68 65 73 2c 20 63 |orts, pa|tches, c|
|000001f0| 6f 6d 6d 65 6e 74 73 2c | 20 73 75 67 67 65 73 74 |omments,| suggest|
|00000200| 69 6f 6e 73 20 73 68 6f | 75 6c 64 20 62 65 20 73 |ions sho|uld be s|
|00000210| 65 6e 74 20 74 6f 3a 0a | 20 2a 0a 20 2a 20 20 20 |ent to:.| *. * |
|00000220| 20 20 20 42 69 6c 6c 20 | 50 65 6d 62 65 72 74 6f | Bill |Pemberto|
|00000230| 6e 2c 20 45 6c 6d 20 43 | 6f 6f 72 64 69 6e 61 74 |n, Elm C|oordinat|
|00000240| 6f 72 0a 20 2a 20 20 20 | 20 20 20 66 6c 61 73 68 |or. * | flash|
|00000250| 40 76 69 72 67 69 6e 69 | 61 2e 65 64 75 0a 20 2a |@virgini|a.edu. *|
|00000260| 0a 20 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |. ******|********|
|00000270| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000280| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000290| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000002a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000002b0| 2a 0a 20 2a 20 24 4c 6f | 67 3a 20 70 61 72 73 61 |*. * $Lo|g: parsa|
|000002c0| 72 70 6d 62 6f 78 2e 63 | 2c 76 20 24 0a 20 2a 20 |rpmbox.c|,v $. * |
|000002d0| 52 65 76 69 73 69 6f 6e | 20 31 2e 31 2e 31 2e 31 |Revision| 1.1.1.1|
|000002e0| 20 20 32 30 30 31 2f 31 | 31 2f 32 31 20 31 38 3a | 2001/1|1/21 18:|
|000002f0| 32 35 3a 33 35 20 20 6c | 75 64 6f 0a 20 2a 20 49 |25:35 l|udo. * I|
|00000300| 6d 70 6f 72 74 65 64 20 | 53 6f 75 72 63 65 73 0a |mported |Sources.|
|00000310| 20 2a 0a 20 2a 20 52 65 | 76 69 73 69 6f 6e 20 31 | *. * Re|vision 1|
|00000320| 2e 31 2e 31 2e 31 20 20 | 32 30 30 31 2f 30 39 2f |.1.1.1 |2001/09/|
|00000330| 32 38 20 31 33 3a 30 36 | 3a 35 36 20 20 6c 75 64 |28 13:06|:56 lud|
|00000340| 6f 0a 20 2a 20 49 6d 70 | 6f 72 74 20 6f 66 20 73 |o. * Imp|ort of s|
|00000350| 6f 75 72 63 65 73 0a 20 | 2a 0a 20 2a 20 52 65 76 |ources. |*. * Rev|
|00000360| 69 73 69 6f 6e 20 31 2e | 31 2e 31 2e 31 20 20 32 |ision 1.|1.1.1 2|
|00000370| 30 30 31 2f 30 37 2f 32 | 38 20 30 30 3a 30 36 3a |001/07/2|8 00:06:|
|00000380| 33 35 20 20 6c 75 64 6f | 76 69 63 0a 20 2a 20 49 |35 ludo|vic. * I|
|00000390| 6d 70 6f 72 74 65 64 20 | 53 6f 75 72 63 65 73 0a |mported |Sources.|
|000003a0| 20 2a 0a 20 2a 20 52 65 | 76 69 73 69 6f 6e 20 31 | *. * Re|vision 1|
|000003b0| 2e 34 20 20 31 39 39 36 | 2f 30 35 2f 30 39 20 20 |.4 1996|/05/09 |
|000003c0| 31 35 3a 35 31 3a 30 39 | 20 20 77 66 70 35 70 0a |15:51:09| wfp5p.|
|000003d0| 20 2a 20 41 6c 70 68 61 | 20 31 30 0a 20 2a 0a 20 | * Alpha| 10. *. |
|000003e0| 2a 20 52 65 76 69 73 69 | 6f 6e 20 31 2e 33 20 20 |* Revisi|on 1.3 |
|000003f0| 31 39 39 35 2f 30 39 2f | 32 39 20 20 31 37 3a 34 |1995/09/|29 17:4|
|00000400| 31 3a 32 35 20 20 77 66 | 70 35 70 0a 20 2a 20 41 |1:25 wf|p5p. * A|
|00000410| 6c 70 68 61 20 38 20 28 | 43 68 69 70 27 73 20 62 |lpha 8 (|Chip's b|
|00000420| 69 67 20 63 68 61 6e 67 | 65 73 29 0a 20 2a 0a 20 |ig chang|es). *. |
|00000430| 2a 20 52 65 76 69 73 69 | 6f 6e 20 31 2e 32 20 20 |* Revisi|on 1.2 |
|00000440| 31 39 39 35 2f 30 39 2f | 31 31 20 20 31 35 3a 31 |1995/09/|11 15:1|
|00000450| 38 3a 35 36 20 20 77 66 | 70 35 70 0a 20 2a 20 41 |8:56 wf|p5p. * A|
|00000460| 6c 70 68 61 20 37 0a 20 | 2a 0a 20 2a 20 52 65 76 |lpha 7. |*. * Rev|
|00000470| 69 73 69 6f 6e 20 31 2e | 31 20 20 31 39 39 35 2f |ision 1.|1 1995/|
|00000480| 30 37 2f 31 38 20 20 31 | 38 3a 35 39 3a 35 30 20 |07/18 1|8:59:50 |
|00000490| 20 77 66 70 35 70 0a 20 | 2a 20 41 6c 70 68 61 20 | wfp5p. |* Alpha |
|000004a0| 36 0a 20 2a 0a 20 2a 20 | 0a 20 2a 0a 20 2a 2a 2a |6. *. * |. *. ***|
|000004b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000004c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000004d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000004e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000004f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2f 0a 0a 0a 2f |********|***/.../|
|00000500| 2a 0a 20 2a 20 70 61 72 | 73 65 5f 61 72 70 61 5f |*. * par|se_arpa_|
|00000510| 6d 61 69 6c 62 6f 78 28 | 29 20 70 61 72 73 65 73 |mailbox(|) parses|
|00000520| 20 52 46 43 2d 38 32 32 | 20 22 6d 61 69 6c 62 6f | RFC-822| "mailbo|
|00000530| 78 22 20 73 70 65 63 69 | 66 69 63 61 74 69 6f 6e |x" speci|fication|
|00000540| 73 20 69 6e 74 6f 20 61 | 64 64 72 65 73 73 0a 20 |s into a|ddress. |
|00000550| 2a 20 61 6e 64 20 66 75 | 6c 6c 6e 61 6d 65 20 63 |* and fu|llname c|
|00000560| 6f 6d 70 6f 6e 65 6e 74 | 73 2e 20 20 41 20 22 6d |omponent|s. A "m|
|00000570| 61 69 6c 62 6f 78 22 20 | 69 73 20 74 68 65 20 66 |ailbox" |is the f|
|00000580| 6f 72 6d 61 6c 20 6e 61 | 6d 65 20 6f 66 20 74 68 |ormal na|me of th|
|00000590| 65 20 52 46 43 2d 38 32 | 32 0a 20 2a 20 6c 65 78 |e RFC-82|2. * lex|
|000005a0| 69 63 61 6c 20 65 6c 65 | 6d 65 6e 74 20 74 68 61 |ical ele|ment tha|
|000005b0| 74 20 63 6f 72 72 65 73 | 70 6f 6e 64 73 20 74 6f |t corres|ponds to|
|000005c0| 20 77 68 61 74 20 77 65 | 20 6e 6f 72 6d 61 6c 6c | what we| normall|
|000005d0| 79 20 6d 69 67 68 74 20 | 63 61 6c 6c 20 61 6e 0a |y might |call an.|
|000005e0| 20 2a 20 22 61 64 64 72 | 65 73 73 22 2e 20 20 28 | * "addr|ess". (|
|000005f0| 52 46 43 2d 38 32 32 20 | 75 73 65 73 20 74 68 65 |RFC-822 |uses the|
|00000600| 20 74 65 72 6d 20 22 61 | 64 64 72 65 73 73 22 20 | term "a|ddress" |
|00000610| 74 6f 20 64 65 73 63 72 | 69 62 65 20 73 6f 6d 65 |to descr|ibe some|
|00000620| 74 68 69 6e 67 20 65 6c | 73 65 2e 29 0a 20 2a 0a |thing el|se.). *.|
|00000630| 20 2a 20 41 20 22 6d 61 | 69 6c 62 6f 78 22 20 63 | * A "ma|ilbox" c|
|00000640| 61 6e 20 62 65 20 69 6e | 20 6f 6e 65 20 6f 66 20 |an be in| one of |
|00000650| 74 77 6f 20 66 6f 72 6d | 61 74 73 3a 0a 20 2a 0a |two form|ats:. *.|
|00000660| 20 2a 20 20 20 61 64 64 | 72 2d 73 70 65 63 0a 20 | * add|r-spec. |
|00000670| 2a 20 20 20 20 20 20 20 | 73 75 63 68 20 61 73 3a |* |such as:|
|00000680| 20 20 6a 6f 65 40 61 63 | 6d 65 2e 63 6f 6d 20 28 | joe@ac|me.com (|
|00000690| 4a 6f 65 20 55 73 65 72 | 29 0a 20 2a 0a 20 2a 20 |Joe User|). *. * |
|000006a0| 6f 72 3a 0a 20 2a 0a 20 | 2a 20 20 20 5b 70 68 72 |or:. *. |* [phr|
|000006b0| 61 73 65 5d 20 22 3c 22 | 20 5b 72 6f 75 74 65 5d |ase] "<"| [route]|
|000006c0| 20 61 64 64 72 2d 73 70 | 65 63 20 22 3e 22 0a 20 | addr-sp|ec ">". |
|000006d0| 2a 20 20 20 20 20 20 20 | 73 75 63 68 20 61 73 3a |* |such as:|
|000006e0| 20 20 4a 6f 65 20 55 73 | 65 72 20 3c 6a 6f 65 40 | Joe Us|er <joe@|
|000006f0| 61 63 6d 65 2e 63 6f 6d | 3e 0a 20 2a 0a 20 2a 20 |acme.com|>. *. * |
|00000700| 57 65 20 69 6e 76 65 6e | 74 20 74 68 65 20 6e 61 |We inven|t the na|
|00000710| 6d 65 73 20 22 62 61 72 | 65 20 61 64 64 72 2d 73 |mes "bar|e addr-s|
|00000720| 70 65 63 22 20 74 6f 20 | 64 65 73 63 72 69 62 65 |pec" to |describe|
|00000730| 20 74 68 65 20 66 69 72 | 73 74 20 66 6f 72 6d 20 | the fir|st form |
|00000740| 61 6e 64 0a 20 2a 20 22 | 61 6e 67 6c 65 20 61 64 |and. * "|angle ad|
|00000750| 64 72 2d 73 70 65 63 22 | 20 74 6f 20 64 65 73 63 |dr-spec"| to desc|
|00000760| 72 69 62 65 20 74 68 65 | 20 73 65 63 6f 6e 64 2e |ribe the| second.|
|00000770| 0a 20 2a 0a 20 2a 20 53 | 79 6e 6f 70 73 69 73 3a |. *. * S|ynopsis:|
|00000780| 0a 20 2a 0a 20 2a 20 20 | 20 69 6e 74 20 70 61 72 |. *. * | int par|
|00000790| 73 65 5f 61 72 70 61 5f | 6d 61 69 6c 62 6f 78 28 |se_arpa_|mailbox(|
|000007a0| 62 75 66 2c 20 72 65 74 | 5f 61 64 64 72 2c 20 6c |buf, ret|_addr, l|
|000007b0| 65 6e 5f 61 64 64 72 2c | 0a 20 2a 09 09 72 65 74 |en_addr,|. *..ret|
|000007c0| 5f 6e 61 6d 65 2c 20 6c | 65 6e 5f 6e 61 6d 65 2c |_name, l|en_name,|
|000007d0| 20 6e 65 78 74 5f 66 69 | 65 6c 64 29 3b 0a 20 2a | next_fi|eld);. *|
|000007e0| 20 20 20 63 68 61 72 20 | 2a 62 75 66 2c 20 2a 72 | char |*buf, *r|
|000007f0| 65 74 5f 61 64 64 72 2c | 20 2a 72 65 74 5f 6e 61 |et_addr,| *ret_na|
|00000800| 6d 65 2c 20 2a 2a 6e 65 | 78 74 5f 66 69 65 6c 64 |me, **ne|xt_field|
|00000810| 3b 0a 20 2a 20 20 20 69 | 6e 74 20 6c 65 6e 5f 61 |;. * i|nt len_a|
|00000820| 64 64 72 2c 20 6c 65 6e | 5f 6e 61 6d 65 3b 0a 20 |ddr, len|_name;. |
|00000830| 2a 0a 20 2a 20 54 68 69 | 73 20 72 6f 75 74 69 6e |*. * Thi|s routin|
|00000840| 65 20 74 61 6b 65 73 20 | 61 20 63 6f 6d 6d 61 2d |e takes |a comma-|
|00000850| 64 65 6c 69 6d 69 74 65 | 64 20 6c 69 73 74 20 6f |delimite|d list o|
|00000860| 66 20 6d 61 69 6c 62 6f | 78 20 73 70 65 63 69 66 |f mailbo|x specif|
|00000870| 69 63 61 74 69 6f 6e 73 | 0a 20 2a 20 70 6f 69 6e |ications|. * poin|
|00000880| 74 65 64 20 74 6f 20 62 | 79 20 22 62 75 66 22 2c |ted to b|y "buf",|
|00000890| 20 61 6e 64 20 62 72 65 | 61 6b 73 20 74 68 65 20 | and bre|aks the |
|000008a0| 6e 65 78 74 20 6d 61 69 | 6c 62 6f 78 20 73 70 65 |next mai|lbox spe|
|000008b0| 63 69 66 69 63 61 74 69 | 6f 6e 20 69 6e 20 74 68 |cificati|on in th|
|000008c0| 65 0a 20 2a 20 6c 69 73 | 74 20 69 6e 74 6f 20 74 |e. * lis|t into t|
|000008d0| 68 65 20 61 64 64 72 65 | 73 73 20 61 6e 64 20 66 |he addre|ss and f|
|000008e0| 75 6c 6c 6e 61 6d 65 20 | 63 6f 6d 70 6f 6e 65 6e |ullname |componen|
|000008f0| 74 73 2e 20 20 49 74 20 | 69 73 20 4e 4f 4e 64 65 |ts. It |is NONde|
|00000900| 73 74 72 75 63 74 69 76 | 65 0a 20 2a 20 74 6f 20 |structiv|e. * to |
|00000910| 74 68 65 20 62 75 66 66 | 65 72 2e 0a 20 2a 0a 20 |the buff|er.. *. |
|00000920| 2a 20 54 68 65 20 72 65 | 74 75 72 6e 20 63 6f 64 |* The re|turn cod|
|00000930| 65 20 77 69 6c 6c 20 62 | 65 20 30 20 66 6f 72 20 |e will b|e 0 for |
|00000940| 73 75 63 63 65 73 73 2c | 20 2d 31 20 66 6f 72 20 |success,| -1 for |
|00000950| 66 61 69 6c 75 72 65 2e | 20 20 41 6c 6c 20 62 65 |failure.| All be|
|00000960| 74 73 20 61 72 65 0a 20 | 2a 20 6f 66 66 20 69 66 |ts are. |* off if|
|00000970| 20 74 68 65 20 6d 61 69 | 6c 62 6f 78 20 73 70 65 | the mai|lbox spe|
|00000980| 63 69 66 69 63 61 74 69 | 6f 6e 20 69 73 20 70 6f |cificati|on is po|
|00000990| 6f 72 6c 79 20 66 6f 72 | 6d 65 64 20 28 69 2e 65 |orly for|med (i.e|
|000009a0| 2e 20 73 79 6e 74 61 78 | 20 65 72 72 6f 72 73 29 |. syntax| errors)|
|000009b0| 2e 0a 20 2a 20 57 65 20 | 6d 69 67 68 74 20 63 61 |.. * We |might ca|
|000009c0| 74 63 68 20 74 68 65 20 | 70 72 6f 62 6c 65 6d 20 |tch the |problem |
|000009d0| 61 6e 64 20 72 65 74 75 | 72 6e 20 2d 31 2e 20 20 |and retu|rn -1. |
|000009e0| 4f 72 20 77 65 20 6d 69 | 67 68 74 20 69 6e 64 69 |Or we mi|ght indi|
|000009f0| 63 61 74 65 20 73 75 63 | 63 65 73 73 0a 20 2a 20 |cate suc|cess. * |
|00000a00| 61 6e 64 20 72 65 74 75 | 72 6e 20 6e 6f 6e 73 65 |and retu|rn nonse|
|00000a10| 6e 73 65 20 76 61 6c 75 | 65 73 2e 20 20 4f 74 68 |nse valu|es. Oth|
|00000a20| 65 72 20 65 72 72 6f 72 | 20 63 6f 6e 64 69 74 69 |er error| conditi|
|00000a30| 6f 6e 73 20 61 72 65 20 | 64 69 73 63 75 73 73 65 |ons are |discusse|
|00000a40| 64 0a 20 2a 20 62 65 6c | 6f 77 2e 0a 20 2a 0a 20 |d. * bel|ow.. *. |
|00000a50| 2a 20 49 66 20 22 72 65 | 74 5f 61 64 64 72 22 20 |* If "re|t_addr" |
|00000a60| 69 73 20 6e 6f 74 20 4e | 55 4c 4c 2c 20 74 68 65 |is not N|ULL, the|
|00000a70| 6e 20 69 74 20 70 6f 69 | 6e 74 73 20 74 6f 20 61 |n it poi|nts to a|
|00000a80| 20 62 75 66 66 65 72 20 | 77 68 65 72 65 20 74 68 | buffer |where th|
|00000a90| 65 0a 20 2a 20 65 78 74 | 72 61 63 74 65 64 20 61 |e. * ext|racted a|
|00000aa0| 64 64 72 65 73 73 20 69 | 73 20 73 74 6f 72 65 64 |ddress i|s stored|
|00000ab0| 20 61 6e 64 20 74 68 65 | 20 22 6c 65 6e 5f 61 64 | and the| "len_ad|
|00000ac0| 64 72 22 20 69 6e 64 69 | 63 61 74 65 73 20 74 68 |dr" indi|cates th|
|00000ad0| 65 20 73 69 7a 65 20 6f | 66 0a 20 2a 20 74 68 65 |e size o|f. * the|
|00000ae0| 20 62 75 66 66 65 72 2e | 20 20 49 66 20 77 65 20 | buffer.| If we |
|00000af0| 63 61 6e 6e 6f 74 20 6c | 6f 63 61 74 65 20 61 20 |cannot l|ocate a |
|00000b00| 6e 6f 6e 2d 65 6d 70 74 | 79 20 61 64 64 72 65 73 |non-empt|y addres|
|00000b10| 73 20 6f 72 20 69 66 20 | 69 74 20 69 73 20 74 6f |s or if |it is to|
|00000b20| 6f 0a 20 2a 20 6c 61 72 | 67 65 20 74 6f 20 66 69 |o. * lar|ge to fi|
|00000b30| 74 20 69 6e 74 6f 20 74 | 68 65 20 62 75 66 66 65 |t into t|he buffe|
|00000b40| 72 2c 20 74 68 65 6e 20 | 61 6e 20 65 72 72 6f 72 |r, then |an error|
|00000b50| 20 69 73 20 72 65 74 75 | 72 6e 65 64 2e 0a 20 2a | is retu|rned.. *|
|00000b60| 0a 20 2a 20 49 66 20 22 | 72 65 74 5f 6e 61 6d 65 |. * If "|ret_name|
|00000b70| 22 20 69 73 20 6e 6f 74 | 20 4e 55 4c 4c 2c 20 74 |" is not| NULL, t|
|00000b80| 68 65 6e 20 69 74 20 70 | 6f 69 6e 74 73 20 74 6f |hen it p|oints to|
|00000b90| 20 61 20 62 75 66 66 65 | 72 20 77 68 65 72 65 20 | a buffe|r where |
|00000ba0| 74 68 65 0a 20 2a 20 65 | 78 74 72 61 63 74 65 64 |the. * e|xtracted|
|00000bb0| 20 66 75 6c 6c 6e 61 6d | 65 20 69 73 20 73 74 6f | fullnam|e is sto|
|00000bc0| 72 65 64 20 61 6e 64 20 | 74 68 65 20 22 6c 65 6e |red and |the "len|
|00000bd0| 5f 6e 61 6d 65 22 20 69 | 6e 64 69 63 61 74 65 73 |_name" i|ndicates|
|00000be0| 20 74 68 65 20 73 69 7a | 65 20 6f 66 0a 20 2a 20 | the siz|e of. * |
|00000bf0| 74 68 65 20 62 75 66 66 | 65 72 2e 20 20 49 66 20 |the buff|er. If |
|00000c00| 77 65 20 63 61 6e 6e 6f | 74 20 6c 6f 63 61 74 65 |we canno|t locate|
|00000c10| 20 61 20 6e 6f 6e 2d 65 | 6d 70 74 79 20 66 75 6c | a non-e|mpty ful|
|00000c20| 6c 6e 61 6d 65 20 6f 72 | 20 69 66 20 69 74 20 69 |lname or| if it i|
|00000c30| 73 20 74 6f 6f 0a 20 2a | 20 6c 61 72 67 65 20 74 |s too. *| large t|
|00000c40| 6f 20 66 69 74 20 69 6e | 74 6f 20 74 68 65 20 62 |o fit in|to the b|
|00000c50| 75 66 66 65 72 2c 20 74 | 68 65 6e 20 61 6e 20 65 |uffer, t|hen an e|
|00000c60| 6d 70 74 79 20 73 74 72 | 69 6e 67 20 69 73 20 73 |mpty str|ing is s|
|00000c70| 74 6f 72 65 64 20 69 6e | 20 74 68 65 0a 20 2a 20 |tored in| the. * |
|00000c80| 62 75 66 66 65 72 2e 20 | 20 57 65 20 6e 65 65 64 |buffer. | We need|
|00000c90| 20 74 6f 20 64 69 73 63 | 61 72 64 20 74 68 65 20 | to disc|ard the |
|00000ca0| 66 75 6c 6c 6e 61 6d 65 | 20 72 61 74 68 65 72 20 |fullname| rather |
|00000cb0| 74 68 61 6e 20 74 72 75 | 6e 63 61 74 69 6e 67 20 |than tru|ncating |
|00000cc0| 69 74 0a 20 2a 20 62 65 | 63 61 75 73 65 20 74 72 |it. * be|cause tr|
|00000cd0| 75 6e 63 61 74 69 6f 6e | 20 63 6f 75 6c 64 20 72 |uncation| could r|
|00000ce0| 65 73 75 6c 74 20 69 6e | 20 61 6e 20 69 6c 6c 65 |esult in| an ille|
|00000cf0| 67 61 6c 20 76 61 6c 75 | 65 20 28 65 2e 67 2e 20 |gal valu|e (e.g. |
|00000d00| 75 6e 62 61 6c 61 6e 63 | 65 64 0a 20 2a 20 71 75 |unbalanc|ed. * qu|
|00000d10| 6f 74 65 73 29 2e 20 20 | 41 73 20 61 6e 20 61 64 |otes). |As an ad|
|00000d20| 64 65 64 20 6c 69 74 74 | 6c 65 20 67 6c 69 74 63 |ded litt|le glitc|
|00000d30| 68 2c 20 69 66 20 74 68 | 65 20 66 75 6c 6c 6e 61 |h, if th|e fullna|
|00000d40| 6d 65 20 76 61 6c 75 65 | 20 69 73 20 66 75 6c 6c |me value| is full|
|00000d50| 79 0a 20 2a 20 65 6e 63 | 6c 6f 73 65 64 20 69 6e |y. * enc|losed in|
|00000d60| 20 64 6f 75 62 6c 65 2d | 71 75 6f 74 65 73 20 28 | double-|quotes (|
|00000d70| 61 6e 64 20 77 69 74 68 | 20 6e 6f 20 69 6e 74 65 |and with| no inte|
|00000d80| 72 69 6f 72 20 64 6f 75 | 62 6c 65 2d 71 75 6f 74 |rior dou|ble-quot|
|00000d90| 65 73 29 2c 20 74 68 65 | 6e 0a 20 2a 20 74 68 65 |es), the|n. * the|
|00000da0| 20 71 75 6f 74 65 73 20 | 77 69 6c 6c 20 62 65 20 | quotes |will be |
|00000db0| 73 74 72 69 70 70 65 64 | 2e 0a 20 2a 0a 20 2a 20 |stripped|.. *. * |
|00000dc0| 49 66 20 74 68 65 20 22 | 6e 65 78 74 5f 66 69 65 |If the "|next_fie|
|00000dd0| 6c 64 22 20 70 6f 69 6e | 74 65 72 20 69 73 20 6e |ld" poin|ter is n|
|00000de0| 6f 74 20 4e 55 4c 4c 2c | 20 69 74 20 77 69 6c 6c |ot NULL,| it will|
|00000df0| 20 62 65 20 73 65 74 20 | 74 6f 20 70 6f 69 6e 74 | be set |to point|
|00000e00| 20 74 6f 0a 20 2a 20 74 | 68 65 20 62 65 67 69 6e | to. * t|he begin|
|00000e10| 6e 69 6e 67 20 6f 66 20 | 74 68 65 20 6e 65 78 74 |ning of |the next|
|00000e20| 20 6d 61 69 6c 62 6f 78 | 20 73 70 65 63 69 66 69 | mailbox| specifi|
|00000e30| 63 61 74 69 6f 6e 20 69 | 6e 20 74 68 65 20 6c 69 |cation i|n the li|
|00000e40| 73 74 2e 20 20 49 74 20 | 77 69 6c 6c 0a 20 2a 20 |st. It |will. * |
|00000e50| 70 6f 69 6e 74 20 74 6f | 20 74 68 65 20 27 5c 30 |point to| the '\0|
|00000e60| 27 20 73 74 72 69 6e 67 | 20 74 65 72 6d 69 6e 61 |' string| termina|
|00000e70| 74 6f 72 20 77 68 65 6e | 20 74 68 65 20 6c 69 73 |tor when| the lis|
|00000e80| 74 20 69 73 20 63 6f 6d | 70 6c 65 74 65 2e 20 20 |t is com|plete. |
|00000e90| 54 68 69 73 0a 20 2a 20 | 75 70 64 61 74 65 20 6f |This. * |update o|
|00000ea0| 63 63 75 72 73 20 65 76 | 65 6e 20 69 66 20 61 6e |ccurs ev|en if an|
|00000eb0| 20 65 72 72 6f 72 20 63 | 6f 64 65 20 69 73 20 72 | error c|ode is r|
|00000ec0| 65 74 75 72 6e 65 64 2c | 20 74 68 75 73 20 61 64 |eturned,| thus ad|
|00000ed0| 64 72 65 73 73 20 70 61 | 72 73 69 6e 67 0a 20 2a |dress pa|rsing. *|
|00000ee0| 20 6d 61 79 20 63 6f 6e | 74 69 6e 75 65 20 77 69 | may con|tinue wi|
|00000ef0| 74 68 20 74 68 65 20 6e | 65 78 74 20 6d 61 69 6c |th the n|ext mail|
|00000f00| 62 6f 78 20 69 6e 20 74 | 68 65 20 6c 69 73 74 2e |box in t|he list.|
|00000f10| 20 20 49 66 20 74 68 65 | 20 22 62 75 66 22 20 63 | If the| "buf" c|
|00000f20| 6f 6e 74 61 69 6e 73 0a | 20 2a 20 61 20 73 69 6e |ontains.| * a sin|
|00000f30| 67 6c 65 20 61 64 64 72 | 65 73 73 2c 20 74 68 65 |gle addr|ess, the|
|00000f40| 20 22 6e 65 78 74 5f 66 | 69 65 6c 64 22 20 72 65 | "next_f|ield" re|
|00000f50| 73 75 6c 74 20 73 68 6f | 75 6c 64 20 62 65 20 63 |sult sho|uld be c|
|00000f60| 68 65 63 6b 65 64 20 75 | 70 6f 6e 20 72 65 74 75 |hecked u|pon retu|
|00000f70| 72 6e 0a 20 2a 20 74 6f | 20 65 6e 73 75 72 65 20 |rn. * to| ensure |
|00000f80| 69 74 20 70 6f 69 6e 74 | 73 20 74 6f 20 74 68 65 |it point|s to the|
|00000f90| 20 27 5c 30 27 20 73 74 | 72 69 6e 67 20 74 65 72 | '\0' st|ring ter|
|00000fa0| 6d 69 6e 61 74 6f 72 2e | 0a 20 2a 2f 0a 0a 23 69 |minator.|. */..#i|
|00000fb0| 6e 63 6c 75 64 65 20 3c | 50 61 6e 74 6f 6d 69 6d |nclude <|Pantomim|
|00000fc0| 65 2f 65 6c 6d 5f 64 65 | 66 73 2e 68 3e 0a 0a 0a |e/elm_de|fs.h>...|
|00000fd0| 73 74 61 74 69 63 20 69 | 6e 74 20 66 75 6c 6c 6e |static i|nt fulln|
|00000fe0| 61 6d 65 5f 69 73 5f 71 | 75 6f 74 65 64 20 50 5f |ame_is_q|uoted P_|
|00000ff0| 28 28 63 6f 6e 73 74 20 | 63 68 61 72 20 2a 2c 20 |((const |char *, |
|00001000| 69 6e 74 29 29 3b 0a 73 | 74 61 74 69 63 20 69 6e |int));.s|tatic in|
|00001010| 74 20 70 61 72 73 65 5f | 62 61 72 65 5f 61 64 64 |t parse_|bare_add|
|00001020| 72 73 70 65 63 0a 09 50 | 5f 28 28 63 6f 6e 73 74 |rspec..P|_((const|
|00001030| 20 63 68 61 72 20 2a 2c | 20 63 68 61 72 20 2a 2c | char *,| char *,|
|00001040| 20 69 6e 74 2c 20 63 68 | 61 72 20 2a 2c 20 69 6e | int, ch|ar *, in|
|00001050| 74 2c 20 63 68 61 72 20 | 2a 2a 29 29 3b 0a 73 74 |t, char |**));.st|
|00001060| 61 74 69 63 20 69 6e 74 | 20 70 61 72 73 65 5f 61 |atic int| parse_a|
|00001070| 6e 67 6c 65 5f 61 64 64 | 72 73 70 65 63 0a 09 50 |ngle_add|rspec..P|
|00001080| 5f 28 28 63 6f 6e 73 74 | 20 63 68 61 72 20 2a 2c |_((const| char *,|
|00001090| 20 63 68 61 72 20 2a 2c | 20 69 6e 74 2c 20 63 68 | char *,| int, ch|
|000010a0| 61 72 20 2a 2c 20 69 6e | 74 2c 20 63 68 61 72 20 |ar *, in|t, char |
|000010b0| 2a 2a 29 29 3b 0a 0a 0a | 69 6e 74 20 70 61 72 73 |**));...|int pars|
|000010c0| 65 5f 61 72 70 61 5f 6d | 61 69 6c 62 6f 78 28 62 |e_arpa_m|ailbox(b|
|000010d0| 75 66 2c 20 72 65 74 5f | 61 64 64 72 2c 20 6c 65 |uf, ret_|addr, le|
|000010e0| 6e 5f 61 64 64 72 2c 20 | 72 65 74 5f 6e 61 6d 65 |n_addr, |ret_name|
|000010f0| 2c 20 6c 65 6e 5f 6e 61 | 6d 65 2c 20 6e 65 78 74 |, len_na|me, next|
|00001100| 5f 66 69 65 6c 64 29 0a | 63 6f 6e 73 74 20 63 68 |_field).|const ch|
|00001110| 61 72 20 2a 62 75 66 3b | 0a 63 68 61 72 20 2a 72 |ar *buf;|.char *r|
|00001120| 65 74 5f 61 64 64 72 2c | 20 2a 72 65 74 5f 6e 61 |et_addr,| *ret_na|
|00001130| 6d 65 2c 20 2a 2a 6e 65 | 78 74 5f 66 69 65 6c 64 |me, **ne|xt_field|
|00001140| 3b 0a 69 6e 74 20 6c 65 | 6e 5f 61 64 64 72 2c 20 |;.int le|n_addr, |
|00001150| 6c 65 6e 5f 6e 61 6d 65 | 3b 0a 7b 0a 20 20 20 20 |len_name|;.{. |
|00001160| 72 65 67 69 73 74 65 72 | 20 63 6f 6e 73 74 20 63 |register| const c|
|00001170| 68 61 72 20 2a 73 3b 0a | 20 20 20 20 69 6e 74 20 |har *s;.| int |
|00001180| 72 63 3b 0a 0a 20 20 20 | 20 2f 2a 0a 20 20 20 20 |rc;.. | /*. |
|00001190| 20 2a 20 54 61 6b 65 20 | 61 20 71 75 69 63 6b 20 | * Take |a quick |
|000011a0| 6c 6f 6f 6b 20 74 68 72 | 6f 75 67 68 20 74 68 65 |look thr|ough the|
|000011b0| 20 62 75 66 66 65 72 20 | 74 6f 20 64 65 74 65 72 | buffer |to deter|
|000011c0| 6d 69 6e 65 20 74 68 65 | 20 66 6f 72 6d 61 74 2e |mine the| format.|
|000011d0| 0a 20 20 20 20 20 2a 2f | 0a 20 20 20 20 66 6f 72 |. */|. for|
|000011e0| 20 28 73 20 3d 20 62 75 | 66 20 3b 20 2a 73 20 21 | (s = bu|f ; *s !|
|000011f0| 3d 20 27 5c 30 27 20 26 | 26 20 2a 73 20 21 3d 20 |= '\0' &|& *s != |
|00001200| 27 3c 27 20 26 26 20 2a | 73 20 21 3d 20 27 2c 27 |'<' && *|s != ','|
|00001210| 20 3b 20 73 20 2b 3d 20 | 72 66 63 38 32 32 5f 74 | ; s += |rfc822_t|
|00001220| 6f 6b 6c 65 6e 28 73 29 | 29 0a 09 3b 0a 0a 20 20 |oklen(s)|)..;.. |
|00001230| 20 20 2f 2a 0a 20 20 20 | 20 20 2a 20 48 61 6e 64 | /*. | * Hand|
|00001240| 6c 65 20 61 73 20 74 68 | 65 20 61 70 70 72 6f 70 |le as th|e approp|
|00001250| 72 69 61 74 65 20 66 6f | 72 6d 61 74 2e 0a 20 20 |riate fo|rmat.. |
|00001260| 20 20 20 2a 2f 0a 20 20 | 20 20 69 66 20 28 2a 73 | */. | if (*s|
|00001270| 20 3d 3d 20 27 3c 27 29 | 20 7b 0a 09 72 63 20 3d | == '<')| {..rc =|
|00001280| 20 70 61 72 73 65 5f 61 | 6e 67 6c 65 5f 61 64 64 | parse_a|ngle_add|
|00001290| 72 73 70 65 63 28 62 75 | 66 2c 0a 09 20 20 20 20 |rspec(bu|f,.. |
|000012a0| 72 65 74 5f 61 64 64 72 | 2c 20 6c 65 6e 5f 61 64 |ret_addr|, len_ad|
|000012b0| 64 72 2c 20 72 65 74 5f | 6e 61 6d 65 2c 20 6c 65 |dr, ret_|name, le|
|000012c0| 6e 5f 6e 61 6d 65 2c 20 | 6e 65 78 74 5f 66 69 65 |n_name, |next_fie|
|000012d0| 6c 64 29 3b 0a 20 20 20 | 20 7d 20 65 6c 73 65 20 |ld);. | } else |
|000012e0| 7b 0a 09 72 63 20 3d 20 | 70 61 72 73 65 5f 62 61 |{..rc = |parse_ba|
|000012f0| 72 65 5f 61 64 64 72 73 | 70 65 63 28 62 75 66 2c |re_addrs|pec(buf,|
|00001300| 0a 09 20 20 20 20 72 65 | 74 5f 61 64 64 72 2c 20 |.. re|t_addr, |
|00001310| 6c 65 6e 5f 61 64 64 72 | 2c 20 72 65 74 5f 6e 61 |len_addr|, ret_na|
|00001320| 6d 65 2c 20 6c 65 6e 5f | 6e 61 6d 65 2c 20 6e 65 |me, len_|name, ne|
|00001330| 78 74 5f 66 69 65 6c 64 | 29 3b 0a 20 20 20 20 7d |xt_field|);. }|
|00001340| 0a 0a 20 20 20 20 2f 2a | 0a 20 20 20 20 20 2a 20 |.. /*|. * |
|00001350| 49 6e 20 74 68 65 20 63 | 61 73 65 20 6f 66 20 61 |In the c|ase of a|
|00001360| 6e 20 65 72 72 6f 72 2c | 20 61 64 76 61 6e 63 65 |n error,| advance|
|00001370| 20 74 6f 20 6e 65 78 74 | 20 6d 61 69 6c 62 6f 78 | to next| mailbox|
|00001380| 20 66 69 65 6c 64 2e 0a | 20 20 20 20 20 2a 2f 0a | field..| */.|
|00001390| 20 20 20 20 69 66 20 28 | 72 63 20 3c 20 30 20 26 | if (|rc < 0 &|
|000013a0| 26 20 6e 65 78 74 5f 66 | 69 65 6c 64 20 21 3d 20 |& next_f|ield != |
|000013b0| 4e 55 4c 4c 29 20 7b 0a | 09 66 6f 72 20 28 73 20 |NULL) {.|.for (s |
|000013c0| 3d 20 62 75 66 20 3b 20 | 2a 73 20 21 3d 20 27 5c |= buf ; |*s != '\|
|000013d0| 30 27 20 26 26 20 2a 73 | 20 21 3d 20 27 2c 27 20 |0' && *s| != ',' |
|000013e0| 3b 20 73 20 2b 3d 20 72 | 66 63 38 32 32 5f 74 6f |; s += r|fc822_to|
|000013f0| 6b 6c 65 6e 28 73 29 29 | 0a 09 20 20 20 20 3b 0a |klen(s))|.. ;.|
|00001400| 09 69 66 20 28 2a 73 20 | 3d 3d 20 27 2c 27 29 0a |.if (*s |== ',').|
|00001410| 09 20 20 20 20 2b 2b 73 | 3b 0a 09 2a 6e 65 78 74 |. ++s|;..*next|
|00001420| 5f 66 69 65 6c 64 20 3d | 20 28 63 68 61 72 20 2a |_field =| (char *|
|00001430| 29 20 73 3b 0a 20 20 20 | 20 7d 0a 0a 20 20 20 20 |) s;. | }.. |
|00001440| 2f 2f 64 70 72 69 6e 74 | 28 35 2c 20 28 73 74 64 |//dprint|(5, (std|
|00001450| 65 72 72 2c 20 22 70 61 | 72 73 65 5f 61 72 70 61 |err, "pa|rse_arpa|
|00001460| 5f 6d 61 69 6c 62 6f 78 | 20 2d 20 61 64 64 72 3d |_mailbox| - addr=|
|00001470| 5c 22 25 73 5c 22 20 6e | 61 6d 65 3d 5c 22 25 73 |\"%s\" n|ame=\"%s|
|00001480| 5c 22 5c 6e 22 2c 0a 20 | 20 20 20 2f 2f 09 28 72 |\"\n",. | //.(r|
|00001490| 65 74 5f 61 64 64 72 20 | 21 3d 20 4e 55 4c 4c 20 |et_addr |!= NULL |
|000014a0| 3f 20 72 65 74 5f 61 64 | 64 72 20 3a 20 22 28 6e |? ret_ad|dr : "(n|
|000014b0| 75 6c 6c 29 22 29 2c 0a | 20 20 20 20 2f 2f 28 72 |ull)"),.| //(r|
|000014c0| 65 74 5f 6e 61 6d 65 20 | 21 3d 20 4e 55 4c 4c 20 |et_name |!= NULL |
|000014d0| 3f 20 72 65 74 5f 6e 61 | 6d 65 20 3a 20 22 28 6e |? ret_na|me : "(n|
|000014e0| 75 6c 6c 29 22 29 29 29 | 3b 0a 20 20 20 20 72 65 |ull)")))|;. re|
|000014f0| 74 75 72 6e 20 72 63 3b | 0a 7d 0a 0a 0a 2f 2a 0a |turn rc;|.}.../*.|
|00001500| 20 2a 20 52 65 74 75 72 | 6e 20 54 52 55 45 20 69 | * Retur|n TRUE i|
|00001510| 66 20 74 68 65 20 66 75 | 6c 6c 6e 61 6d 65 20 73 |f the fu|llname s|
|00001520| 74 72 69 6e 67 20 69 73 | 20 65 6e 63 6c 6f 73 65 |tring is| enclose|
|00001530| 64 20 69 6e 20 64 6f 75 | 62 6c 65 2d 71 75 6f 74 |d in dou|ble-quot|
|00001540| 65 73 2e 0a 20 2a 20 41 | 4e 44 20 69 74 20 69 73 |es.. * A|ND it is|
|00001550| 20 73 61 66 65 20 74 6f | 20 73 74 72 69 70 20 74 | safe to| strip t|
|00001560| 68 65 20 71 75 6f 74 65 | 73 2e 0a 20 2a 2f 0a 73 |he quote|s.. */.s|
|00001570| 74 61 74 69 63 20 69 6e | 74 20 66 75 6c 6c 6e 61 |tatic in|t fullna|
|00001580| 6d 65 5f 69 73 5f 71 75 | 6f 74 65 64 28 66 6e 5f |me_is_qu|oted(fn_|
|00001590| 73 74 72 2c 20 66 6e 5f | 6c 65 6e 29 0a 63 6f 6e |str, fn_|len).con|
|000015a0| 73 74 20 63 68 61 72 20 | 2a 66 6e 5f 73 74 72 3b |st char |*fn_str;|
|000015b0| 0a 69 6e 74 20 66 6e 5f | 6c 65 6e 3b 0a 7b 0a 20 |.int fn_|len;.{. |
|000015c0| 20 20 20 69 66 20 28 66 | 6e 5f 6c 65 6e 20 3c 20 | if (f|n_len < |
|000015d0| 32 20 7c 7c 20 66 6e 5f | 73 74 72 5b 30 5d 20 21 |2 || fn_|str[0] !|
|000015e0| 3d 20 27 22 27 20 7c 7c | 20 66 6e 5f 73 74 72 5b |= '"' ||| fn_str[|
|000015f0| 66 6e 5f 6c 65 6e 2d 31 | 5d 20 21 3d 20 27 22 27 |fn_len-1|] != '"'|
|00001600| 29 0a 09 72 65 74 75 72 | 6e 20 46 41 4c 53 45 3b |)..retur|n FALSE;|
|00001610| 0a 20 20 20 20 66 6f 72 | 20 28 66 6e 5f 6c 65 6e |. for| (fn_len|
|00001620| 20 2d 3d 20 32 20 3b 20 | 66 6e 5f 6c 65 6e 20 3e | -= 2 ; |fn_len >|
|00001630| 20 30 20 3b 20 2d 2d 66 | 6e 5f 6c 65 6e 29 20 7b | 0 ; --f|n_len) {|
|00001640| 0a 09 73 77 69 74 63 68 | 20 28 2a 2b 2b 66 6e 5f |..switch| (*++fn_|
|00001650| 73 74 72 29 20 7b 0a 09 | 20 20 20 20 63 61 73 65 |str) {..| case|
|00001660| 20 27 22 27 3a 20 72 65 | 74 75 72 6e 20 46 41 4c | '"': re|turn FAL|
|00001670| 53 45 3b 0a 09 20 20 20 | 20 63 61 73 65 20 27 28 |SE;.. | case '(|
|00001680| 27 3a 20 72 65 74 75 72 | 6e 20 46 41 4c 53 45 3b |': retur|n FALSE;|
|00001690| 0a 09 20 20 20 20 63 61 | 73 65 20 27 29 27 3a 20 |.. ca|se ')': |
|000016a0| 72 65 74 75 72 6e 20 46 | 41 4c 53 45 3b 0a 09 7d |return F|ALSE;..}|
|000016b0| 0a 20 20 20 20 7d 0a 20 | 20 20 20 72 65 74 75 72 |. }. | retur|
|000016c0| 6e 20 54 52 55 45 3b 0a | 7d 0a 0a 0a 2f 2a 0a 20 |n TRUE;.|}.../*. |
|000016d0| 2a 20 50 61 72 73 65 20 | 61 20 6d 61 69 6c 62 6f |* Parse |a mailbo|
|000016e0| 78 20 73 70 65 63 20 69 | 6e 20 74 68 65 20 66 6f |x spec i|n the fo|
|000016f0| 72 6d 61 74 3a 20 20 61 | 64 64 72 2d 73 70 65 63 |rmat: a|ddr-spec|
|00001700| 0a 20 2a 2f 0a 73 74 61 | 74 69 63 20 69 6e 74 20 |. */.sta|tic int |
|00001710| 70 61 72 73 65 5f 62 61 | 72 65 5f 61 64 64 72 73 |parse_ba|re_addrs|
|00001720| 70 65 63 28 62 75 66 2c | 0a 09 72 65 74 5f 61 64 |pec(buf,|..ret_ad|
|00001730| 64 72 2c 20 6c 65 6e 5f | 61 64 64 72 2c 20 72 65 |dr, len_|addr, re|
|00001740| 74 5f 6e 61 6d 65 2c 20 | 6c 65 6e 5f 6e 61 6d 65 |t_name, |len_name|
|00001750| 2c 20 6e 65 78 74 5f 66 | 69 65 6c 64 29 0a 72 65 |, next_f|ield).re|
|00001760| 67 69 73 74 65 72 20 63 | 6f 6e 73 74 20 63 68 61 |gister c|onst cha|
|00001770| 72 20 2a 62 75 66 3b 0a | 63 68 61 72 20 2a 72 65 |r *buf;.|char *re|
|00001780| 74 5f 61 64 64 72 2c 20 | 2a 72 65 74 5f 6e 61 6d |t_addr, |*ret_nam|
|00001790| 65 2c 20 2a 2a 6e 65 78 | 74 5f 66 69 65 6c 64 3b |e, **nex|t_field;|
|000017a0| 0a 69 6e 74 20 6c 65 6e | 5f 61 64 64 72 2c 20 6c |.int len|_addr, l|
|000017b0| 65 6e 5f 6e 61 6d 65 3b | 0a 7b 0a 20 20 20 20 63 |en_name;|.{. c|
|000017c0| 6f 6e 73 74 20 63 68 61 | 72 20 2a 6e 5f 70 74 72 |onst cha|r *n_ptr|
|000017d0| 3b 09 09 2f 2a 20 70 6f | 69 6e 74 65 72 20 74 6f |;../* po|inter to|
|000017e0| 20 28 75 73 65 72 20 6e | 61 6d 65 29 20 69 6e 74 | (user n|ame) int|
|000017f0| 6f 20 22 62 75 66 22 09 | 2a 2f 0a 20 20 20 20 69 |o "buf".|*/. i|
|00001800| 6e 74 20 6e 5f 6c 65 6e | 3b 09 09 09 2f 2a 20 6c |nt n_len|;.../* l|
|00001810| 65 6e 67 74 68 20 6f 66 | 20 74 65 78 74 20 70 6f |ength of| text po|
|00001820| 69 6e 74 65 64 20 74 6f | 20 62 79 20 22 6e 5f 70 |inted to| by "n_p|
|00001830| 74 72 22 09 2a 2f 0a 20 | 20 20 20 72 65 67 69 73 |tr".*/. | regis|
|00001840| 74 65 72 20 63 68 61 72 | 20 2a 61 5f 70 74 72 3b |ter char| *a_ptr;|
|00001850| 09 2f 2a 20 70 6f 69 6e | 74 65 72 20 69 6e 74 6f |./* poin|ter into|
|00001860| 20 22 72 65 74 5f 61 64 | 64 72 22 09 09 2a 2f 0a | "ret_ad|dr"..*/.|
|00001870| 20 20 20 20 69 6e 74 20 | 61 5f 73 69 7a 65 3b 09 | int |a_size;.|
|00001880| 09 09 2f 2a 20 73 70 61 | 63 65 20 72 65 6d 61 69 |../* spa|ce remai|
|00001890| 6e 69 6e 67 20 69 6e 20 | 22 72 65 74 5f 61 64 64 |ning in |"ret_add|
|000018a0| 72 22 09 2a 2f 0a 20 20 | 20 20 72 65 67 69 73 74 |r".*/. | regist|
|000018b0| 65 72 20 69 6e 74 20 74 | 6c 65 6e 3b 09 09 2f 2a |er int t|len;../*|
|000018c0| 20 6c 65 6e 67 74 68 20 | 6f 66 20 63 75 72 72 65 | length |of curre|
|000018d0| 6e 74 20 74 6f 6b 65 6e | 09 09 2a 2f 0a 20 20 20 |nt token|..*/. |
|000018e0| 20 69 6e 74 20 67 6f 74 | 5f 61 64 64 72 3b 09 09 | int got|_addr;..|
|000018f0| 2f 2a 20 69 6e 64 69 63 | 61 74 65 73 20 61 6e 20 |/* indic|ates an |
|00001900| 61 64 64 72 65 73 73 20 | 77 61 73 20 66 6f 75 6e |address |was foun|
|00001910| 64 09 2a 2f 0a 0a 20 20 | 20 20 2f 2a 0a 20 20 20 |d.*/.. | /*. |
|00001920| 20 20 2a 20 49 6e 69 74 | 69 61 6c 69 7a 65 20 70 | * Init|ialize p|
|00001930| 6f 69 6e 74 65 72 20 69 | 6e 74 6f 20 61 64 64 72 |ointer i|nto addr|
|00001940| 65 73 73 20 73 74 6f 72 | 61 67 65 2c 20 61 6e 64 |ess stor|age, and|
|00001950| 20 72 65 73 65 72 76 65 | 20 73 70 61 63 65 20 66 | reserve| space f|
|00001960| 6f 72 0a 20 20 20 20 20 | 2a 20 74 68 65 20 27 5c |or. |* the '\|
|00001970| 30 27 20 74 65 72 6d 69 | 6e 61 74 6f 72 2e 0a 20 |0' termi|nator.. |
|00001980| 20 20 20 20 2a 2f 0a 20 | 20 20 20 61 5f 70 74 72 | */. | a_ptr|
|00001990| 20 3d 20 72 65 74 5f 61 | 64 64 72 3b 0a 20 20 20 | = ret_a|ddr;. |
|000019a0| 20 61 5f 73 69 7a 65 20 | 3d 20 28 6c 65 6e 5f 61 | a_size |= (len_a|
|000019b0| 64 64 72 20 2d 20 31 29 | 3b 0a 0a 20 20 20 20 2f |ddr - 1)|;.. /|
|000019c0| 2a 0a 20 20 20 20 20 2a | 20 57 65 20 77 69 6c 6c |*. *| We will|
|000019d0| 20 73 65 74 20 22 6e 5f | 70 74 72 22 20 74 6f 20 | set "n_|ptr" to |
|000019e0| 74 68 65 20 72 69 67 68 | 74 2d 6d 6f 73 74 20 6f |the righ|t-most o|
|000019f0| 63 63 75 72 61 6e 63 65 | 20 6f 66 20 28 70 61 72 |ccurance| of (par|
|00001a00| 65 6e 73 29 0a 20 20 20 | 20 20 2a 20 65 6e 63 6f |ens). | * enco|
|00001a10| 75 6e 74 65 72 65 64 20 | 77 68 65 6e 20 73 63 61 |untered |when sca|
|00001a20| 6e 6e 69 6e 67 20 74 68 | 65 20 62 75 66 66 65 72 |nning th|e buffer|
|00001a30| 2e 20 20 57 65 20 67 6f | 20 62 61 63 6b 20 6c 61 |. We go| back la|
|00001a40| 74 65 72 20 61 6e 64 0a | 20 20 20 20 20 2a 20 65 |ter and.| * e|
|00001a50| 78 74 72 61 63 74 20 74 | 68 69 73 20 69 6e 74 6f |xtract t|his into|
|00001a60| 20 74 68 65 20 22 72 65 | 74 5f 6e 61 6d 65 22 20 | the "re|t_name" |
|00001a70| 62 75 66 66 65 72 2e 0a | 20 20 20 20 20 2a 2f 0a |buffer..| */.|
|00001a80| 20 20 20 20 6e 5f 70 74 | 72 20 3d 20 4e 55 4c 4c | n_pt|r = NULL|
|00001a90| 3b 0a 20 20 20 20 6e 5f | 6c 65 6e 20 3d 20 30 3b |;. n_|len = 0;|
|00001aa0| 20 2f 2a 20 74 6f 20 6b | 65 65 70 20 22 67 63 63 | /* to k|eep "gcc|
|00001ab0| 20 2d 57 61 6c 6c 22 20 | 66 72 6f 6d 20 77 68 69 | -Wall" |from whi|
|00001ac0| 6e 69 6e 67 20 2a 2f 0a | 0a 20 20 20 20 2f 2a 0a |ning */.|. /*.|
|00001ad0| 20 20 20 20 20 2a 20 57 | 65 20 77 69 6c 6c 20 73 | * W|e will s|
|00001ae0| 65 74 20 74 68 69 73 20 | 54 52 55 45 20 77 68 65 |et this |TRUE whe|
|00001af0| 6e 20 77 65 20 64 69 73 | 63 6f 76 65 72 20 74 68 |n we dis|cover th|
|00001b00| 65 72 65 20 72 65 61 6c | 6c 79 20 69 73 20 61 6e |ere real|ly is an|
|00001b10| 20 61 64 64 72 20 68 65 | 72 65 2e 0a 20 20 20 20 | addr he|re.. |
|00001b20| 20 2a 2f 0a 20 20 20 20 | 67 6f 74 5f 61 64 64 72 | */. |got_addr|
|00001b30| 20 3d 20 46 41 4c 53 45 | 3b 0a 0a 20 20 20 20 2f | = FALSE|;.. /|
|00001b40| 2a 0a 20 20 20 20 20 2a | 20 44 69 73 63 61 72 64 |*. *| Discard|
|00001b50| 20 6c 65 61 64 69 6e 67 | 20 73 70 61 63 65 2e 0a | leading| space..|
|00001b60| 20 20 20 20 20 2a 2f 0a | 20 20 20 20 77 68 69 6c | */.| whil|
|00001b70| 65 20 28 69 73 73 70 61 | 63 65 28 2a 62 75 66 29 |e (isspa|ce(*buf)|
|00001b80| 29 0a 09 2b 2b 62 75 66 | 3b 0a 0a 20 20 20 20 2f |)..++buf|;.. /|
|00001b90| 2a 0a 20 20 20 20 20 2a | 20 53 63 61 6e 20 74 68 |*. *| Scan th|
|00001ba0| 72 6f 75 67 68 20 74 68 | 65 20 66 69 65 6c 64 2c |rough th|e field,|
|00001bb0| 20 63 6f 70 79 69 6e 67 | 20 6f 75 74 20 74 68 65 | copying| out the|
|00001bc0| 20 61 64 64 72 65 73 73 | 20 65 6c 65 6d 65 6e 74 | address| element|
|00001bd0| 73 2e 0a 20 20 20 20 20 | 2a 2f 0a 20 20 20 20 77 |s.. |*/. w|
|00001be0| 68 69 6c 65 20 28 2a 62 | 75 66 20 21 3d 20 27 5c |hile (*b|uf != '\|
|00001bf0| 30 27 20 26 26 20 2a 62 | 75 66 20 21 3d 20 27 2c |0' && *b|uf != ',|
|00001c00| 27 29 20 7b 0a 09 74 6c | 65 6e 20 3d 20 72 66 63 |') {..tl|en = rfc|
|00001c10| 38 32 32 5f 74 6f 6b 6c | 65 6e 28 62 75 66 29 3b |822_tokl|en(buf);|
|00001c20| 0a 09 69 66 20 28 69 73 | 73 70 61 63 65 28 2a 62 |..if (is|space(*b|
|00001c30| 75 66 29 29 20 7b 0a 09 | 20 20 20 20 2f 2a 0a 09 |uf)) {..| /*..|
|00001c40| 20 20 20 20 20 2a 20 44 | 69 73 63 61 72 64 20 77 | * D|iscard w|
|00001c50| 68 69 74 65 73 70 61 63 | 65 2e 0a 09 20 20 20 20 |hitespac|e... |
|00001c60| 20 2a 2f 0a 09 20 20 20 | 20 3b 20 2f 2a 20 6e 6f | */.. | ; /* no|
|00001c70| 70 20 2a 2f 0a 09 7d 20 | 65 6c 73 65 20 69 66 20 |p */..} |else if |
|00001c80| 28 2a 62 75 66 20 3d 3d | 20 27 28 27 29 20 7b 20 |(*buf ==| '(') { |
|00001c90| 2f 2a 29 2a 2f 0a 09 20 | 20 20 20 2f 2a 0a 09 20 |/*)*/.. | /*.. |
|00001ca0| 20 20 20 20 2a 20 53 61 | 76 65 20 69 6e 66 6f 20 | * Sa|ve info |
|00001cb0| 73 6f 20 77 65 20 63 61 | 6e 20 67 6f 20 62 61 63 |so we ca|n go bac|
|00001cc0| 6b 20 6c 61 74 65 72 20 | 61 6e 64 20 65 78 74 72 |k later |and extr|
|00001cd0| 61 63 74 0a 09 20 20 20 | 20 20 2a 20 74 68 65 20 |act.. | * the |
|00001ce0| 72 69 67 68 74 2d 6d 6f | 73 74 20 63 6f 6d 6d 65 |right-mo|st comme|
|00001cf0| 6e 74 20 77 69 74 68 20 | 28 70 61 72 65 6e 73 29 |nt with |(parens)|
|00001d00| 20 73 74 72 69 70 70 65 | 64 2e 0a 09 20 20 20 20 | strippe|d... |
|00001d10| 20 2a 2f 0a 09 20 20 20 | 20 6e 5f 70 74 72 20 3d | */.. | n_ptr =|
|00001d20| 20 62 75 66 2b 31 3b 0a | 09 20 20 20 20 6e 5f 6c | buf+1;.|. n_l|
|00001d30| 65 6e 20 3d 20 74 6c 65 | 6e 2d 32 3b 0a 09 7d 20 |en = tle|n-2;..} |
|00001d40| 65 6c 73 65 20 7b 0a 09 | 20 20 20 20 2f 2a 0a 09 |else {..| /*..|
|00001d50| 20 20 20 20 20 2a 20 54 | 68 69 73 20 69 73 20 61 | * T|his is a|
|00001d60| 20 70 6f 72 74 69 6f 6e | 20 6f 66 20 74 68 65 20 | portion| of the |
|00001d70| 61 64 64 72 65 73 73 2e | 0a 09 20 20 20 20 20 2a |address.|.. *|
|00001d80| 2f 0a 09 20 20 20 20 69 | 66 20 28 61 5f 70 74 72 |/.. i|f (a_ptr|
|00001d90| 20 21 3d 20 4e 55 4c 4c | 29 20 7b 0a 09 09 69 66 | != NULL|) {...if|
|00001da0| 20 28 74 6c 65 6e 20 3e | 3d 20 61 5f 73 69 7a 65 | (tlen >|= a_size|
|00001db0| 29 0a 09 09 20 20 20 20 | 72 65 74 75 72 6e 20 2d |)... |return -|
|00001dc0| 31 3b 0a 09 09 28 76 6f | 69 64 29 20 73 74 72 6e |1;...(vo|id) strn|
|00001dd0| 63 70 79 28 61 5f 70 74 | 72 2c 20 62 75 66 2c 20 |cpy(a_pt|r, buf, |
|00001de0| 74 6c 65 6e 29 3b 0a 09 | 09 61 5f 70 74 72 20 2b |tlen);..|.a_ptr +|
|00001df0| 3d 20 74 6c 65 6e 3b 0a | 09 09 61 5f 73 69 7a 65 |= tlen;.|..a_size|
|00001e00| 20 2d 3d 20 74 6c 65 6e | 3b 0a 09 20 20 20 20 7d | -= tlen|;.. }|
|00001e10| 0a 09 20 20 20 20 67 6f | 74 5f 61 64 64 72 20 3d |.. go|t_addr =|
|00001e20| 20 54 52 55 45 3b 0a 09 | 7d 0a 09 62 75 66 20 2b | TRUE;..|}..buf +|
|00001e30| 3d 20 74 6c 65 6e 3b 0a | 20 20 20 20 7d 0a 0a 20 |= tlen;.| }.. |
|00001e40| 20 20 20 2f 2a 0a 20 20 | 20 20 20 2a 20 4d 61 6b | /*. | * Mak|
|00001e50| 65 20 73 75 72 65 20 77 | 65 20 65 78 74 72 61 63 |e sure w|e extrac|
|00001e60| 74 65 64 20 61 20 76 61 | 6c 69 64 20 61 64 64 72 |ted a va|lid addr|
|00001e70| 65 73 73 20 61 6e 64 20 | 74 65 72 6d 69 6e 61 74 |ess and |terminat|
|00001e80| 65 20 74 68 65 20 73 74 | 72 69 6e 67 2e 0a 20 20 |e the st|ring.. |
|00001e90| 20 20 20 2a 2f 0a 20 20 | 20 20 69 66 20 28 21 67 | */. | if (!g|
|00001ea0| 6f 74 5f 61 64 64 72 29 | 0a 09 72 65 74 75 72 6e |ot_addr)|..return|
|00001eb0| 20 2d 31 3b 0a 20 20 20 | 20 69 66 20 28 61 5f 70 | -1;. | if (a_p|
|00001ec0| 74 72 20 21 3d 20 4e 55 | 4c 4c 29 0a 09 2a 61 5f |tr != NU|LL)..*a_|
|00001ed0| 70 74 72 20 3d 20 27 5c | 30 27 3b 0a 0a 20 20 20 |ptr = '\|0';.. |
|00001ee0| 20 2f 2a 0a 20 20 20 20 | 20 2a 20 49 66 20 74 68 | /*. | * If th|
|00001ef0| 65 72 65 20 69 73 20 61 | 20 66 75 6c 6c 6e 61 6d |ere is a| fullnam|
|00001f00| 65 20 63 6f 6d 6d 65 6e | 74 20 74 68 65 6e 20 73 |e commen|t then s|
|00001f10| 61 76 65 20 69 74 20 6f | 66 66 2c 20 65 6c 73 65 |ave it o|ff, else|
|00001f20| 20 73 65 74 20 74 68 65 | 20 72 65 73 75 6c 74 0a | set the| result.|
|00001f30| 20 20 20 20 20 2a 20 74 | 6f 20 61 6e 20 65 6d 70 | * t|o an emp|
|00001f40| 74 79 20 73 74 72 69 6e | 67 2e 20 20 41 6c 73 6f |ty strin|g. Also|
|00001f50| 20 72 65 74 75 72 6e 20 | 61 6e 20 65 6d 70 74 79 | return |an empty|
|00001f60| 20 73 74 72 69 6e 67 20 | 69 66 20 74 68 65 20 62 | string |if the b|
|00001f70| 75 66 66 65 72 20 69 73 | 6e 27 74 0a 20 20 20 20 |uffer is|n't. |
|00001f80| 20 2a 20 62 69 67 20 65 | 6e 6f 75 67 68 2e 20 20 | * big e|nough. |
|00001f90| 54 68 61 74 27 73 20 62 | 65 63 61 75 73 65 20 69 |That's b|ecause i|
|00001fa0| 66 20 77 65 20 6f 6e 6c | 79 20 73 74 6f 72 65 64 |f we onl|y stored|
|00001fb0| 20 6f 66 66 20 61 20 70 | 6f 72 74 69 6f 6e 2c 20 | off a p|ortion, |
|00001fc0| 77 65 0a 20 20 20 20 20 | 2a 20 63 6f 75 6c 64 20 |we. |* could |
|00001fd0| 65 6e 64 20 75 70 20 77 | 69 74 68 20 73 6f 6d 65 |end up w|ith some|
|00001fe0| 74 68 69 6e 67 20 6c 69 | 6b 65 20 75 6e 62 61 6c |thing li|ke unbal|
|00001ff0| 61 6e 63 65 64 20 71 75 | 6f 74 65 73 2e 0a 20 20 |anced qu|otes.. |
|00002000| 20 20 20 2a 2f 0a 20 20 | 20 20 69 66 20 28 72 65 | */. | if (re|
|00002010| 74 5f 6e 61 6d 65 20 21 | 3d 20 4e 55 4c 4c 29 20 |t_name !|= NULL) |
|00002020| 7b 0a 09 69 66 20 28 6e | 5f 70 74 72 20 3d 3d 20 |{..if (n|_ptr == |
|00002030| 4e 55 4c 4c 29 20 7b 0a | 09 20 20 20 20 2a 72 65 |NULL) {.|. *re|
|00002040| 74 5f 6e 61 6d 65 20 3d | 20 27 5c 30 27 3b 0a 09 |t_name =| '\0';..|
|00002050| 7d 20 65 6c 73 65 20 7b | 0a 09 20 20 20 20 69 66 |} else {|.. if|
|00002060| 20 28 2a 6e 5f 70 74 72 | 20 3d 3d 20 27 22 27 20 | (*n_ptr| == '"' |
|00002070| 26 26 20 66 75 6c 6c 6e | 61 6d 65 5f 69 73 5f 71 |&& fulln|ame_is_q|
|00002080| 75 6f 74 65 64 28 6e 5f | 70 74 72 2c 20 6e 5f 6c |uoted(n_|ptr, n_l|
|00002090| 65 6e 29 29 20 7b 0a 09 | 09 2b 2b 6e 5f 70 74 72 |en)) {..|.++n_ptr|
|000020a0| 3b 0a 09 09 6e 5f 6c 65 | 6e 20 2d 3d 20 32 3b 0a |;...n_le|n -= 2;.|
|000020b0| 09 20 20 20 20 7d 0a 09 | 20 20 20 20 69 66 20 28 |. }..| if (|
|000020c0| 6e 5f 6c 65 6e 20 3e 20 | 30 20 26 26 20 6e 5f 6c |n_len > |0 && n_l|
|000020d0| 65 6e 20 3c 20 6c 65 6e | 5f 6e 61 6d 65 29 0a 09 |en < len|_name)..|
|000020e0| 09 28 76 6f 69 64 29 20 | 73 74 72 66 63 70 79 28 |.(void) |strfcpy(|
|000020f0| 72 65 74 5f 6e 61 6d 65 | 2c 20 6e 5f 70 74 72 2c |ret_name|, n_ptr,|
|00002100| 20 6e 5f 6c 65 6e 2b 31 | 29 3b 0a 09 20 20 20 20 | n_len+1|);.. |
|00002110| 65 6c 73 65 0a 09 09 2a | 72 65 74 5f 6e 61 6d 65 |else...*|ret_name|
|00002120| 20 3d 20 27 5c 30 27 3b | 0a 09 7d 0a 20 20 20 20 | = '\0';|..}. |
|00002130| 7d 0a 0a 20 20 20 20 2f | 2a 0a 20 20 20 20 20 2a |}.. /|*. *|
|00002140| 20 57 65 20 73 68 6f 75 | 6c 64 20 62 65 20 61 74 | We shou|ld be at|
|00002150| 20 74 68 65 20 65 6e 64 | 20 6f 66 20 74 68 65 20 | the end| of the |
|00002160| 6d 61 69 6c 62 6f 78 20 | 66 69 65 6c 64 2e 0a 20 |mailbox |field.. |
|00002170| 20 20 20 20 2a 2f 0a 20 | 20 20 20 69 66 20 28 2a | */. | if (*|
|00002180| 62 75 66 20 21 3d 20 27 | 5c 30 27 20 26 26 20 2a |buf != '|\0' && *|
|00002190| 62 75 66 20 21 3d 20 27 | 2c 27 29 0a 09 72 65 74 |buf != '|,')..ret|
|000021a0| 75 72 6e 20 2d 31 3b 0a | 0a 20 20 20 20 2f 2a 0a |urn -1;.|. /*.|
|000021b0| 20 20 20 20 20 2a 20 53 | 61 76 65 20 6f 66 66 20 | * S|ave off |
|000021c0| 70 6f 69 6e 74 65 72 20 | 74 6f 20 6e 65 78 74 20 |pointer |to next |
|000021d0| 6d 61 69 6c 62 6f 78 20 | 66 69 65 6c 64 2e 0a 20 |mailbox |field.. |
|000021e0| 20 20 20 20 2a 2f 0a 20 | 20 20 20 69 66 20 28 6e | */. | if (n|
|000021f0| 65 78 74 5f 66 69 65 6c | 64 20 21 3d 20 4e 55 4c |ext_fiel|d != NUL|
|00002200| 4c 29 0a 09 2a 6e 65 78 | 74 5f 66 69 65 6c 64 20 |L)..*nex|t_field |
|00002210| 3d 20 28 63 68 61 72 20 | 2a 29 20 62 75 66 20 2b |= (char |*) buf +|
|00002220| 20 28 2a 62 75 66 20 3d | 3d 20 27 2c 27 20 3f 20 | (*buf =|= ',' ? |
|00002230| 31 20 3a 20 30 29 3b 0a | 0a 20 20 20 20 72 65 74 |1 : 0);.|. ret|
|00002240| 75 72 6e 20 30 3b 0a 7d | 0a 0a 0a 2f 2a 0a 20 2a |urn 0;.}|.../*. *|
|00002250| 20 50 61 72 73 65 20 61 | 20 6d 61 69 6c 62 6f 78 | Parse a| mailbox|
|00002260| 20 73 70 65 63 20 69 6e | 20 74 68 65 20 66 6f 72 | spec in| the for|
|00002270| 6d 61 74 3a 20 20 5b 70 | 68 72 61 73 65 5d 20 22 |mat: [p|hrase] "|
|00002280| 3c 22 20 5b 72 6f 75 74 | 65 5d 20 61 64 64 72 2d |<" [rout|e] addr-|
|00002290| 73 70 65 63 20 22 3e 22 | 0a 20 2a 2f 0a 73 74 61 |spec ">"|. */.sta|
|000022a0| 74 69 63 20 69 6e 74 20 | 70 61 72 73 65 5f 61 6e |tic int |parse_an|
|000022b0| 67 6c 65 5f 61 64 64 72 | 73 70 65 63 28 62 75 66 |gle_addr|spec(buf|
|000022c0| 2c 0a 09 72 65 74 5f 61 | 64 64 72 2c 20 6c 65 6e |,..ret_a|ddr, len|
|000022d0| 5f 61 64 64 72 2c 20 72 | 65 74 5f 6e 61 6d 65 2c |_addr, r|et_name,|
|000022e0| 20 6c 65 6e 5f 6e 61 6d | 65 2c 20 6e 65 78 74 5f | len_nam|e, next_|
|000022f0| 66 69 65 6c 64 29 0a 72 | 65 67 69 73 74 65 72 20 |field).r|egister |
|00002300| 63 6f 6e 73 74 20 63 68 | 61 72 20 2a 62 75 66 3b |const ch|ar *buf;|
|00002310| 0a 63 68 61 72 20 2a 72 | 65 74 5f 61 64 64 72 2c |.char *r|et_addr,|
|00002320| 20 2a 72 65 74 5f 6e 61 | 6d 65 2c 20 2a 2a 6e 65 | *ret_na|me, **ne|
|00002330| 78 74 5f 66 69 65 6c 64 | 3b 0a 69 6e 74 20 6c 65 |xt_field|;.int le|
|00002340| 6e 5f 61 64 64 72 2c 20 | 6c 65 6e 5f 6e 61 6d 65 |n_addr, |len_name|
|00002350| 3b 0a 7b 0a 20 20 20 20 | 63 6f 6e 73 74 20 63 68 |;.{. |const ch|
|00002360| 61 72 20 2a 62 65 67 5f | 66 69 65 6c 64 2c 20 2a |ar *beg_|field, *|
|00002370| 65 6e 64 5f 66 69 65 6c | 64 3b 0a 20 20 20 20 72 |end_fiel|d;. r|
|00002380| 65 67 69 73 74 65 72 20 | 69 6e 74 20 74 6c 65 6e |egister |int tlen|
|00002390| 3b 0a 20 20 20 20 69 6e | 74 20 77 3b 0a 0a 20 20 |;. in|t w;.. |
|000023a0| 20 20 2f 2a 0a 20 20 20 | 20 20 2a 20 44 69 73 63 | /*. | * Disc|
|000023b0| 61 72 64 20 6c 65 61 64 | 69 6e 67 20 73 70 61 63 |ard lead|ing spac|
|000023c0| 65 2e 0a 20 20 20 20 20 | 2a 2f 0a 20 20 20 20 77 |e.. |*/. w|
|000023d0| 68 69 6c 65 20 28 69 73 | 73 70 61 63 65 28 2a 62 |hile (is|space(*b|
|000023e0| 75 66 29 29 0a 09 2b 2b | 62 75 66 3b 0a 0a 20 20 |uf))..++|buf;.. |
|000023f0| 20 20 2f 2a 0a 20 20 20 | 20 20 2a 20 4c 6f 63 61 | /*. | * Loca|
|00002400| 74 65 20 74 68 65 20 66 | 72 6f 6e 74 20 61 6e 64 |te the f|ront and|
|00002410| 20 62 61 63 6b 20 6f 66 | 20 74 68 65 20 66 75 6c | back of| the ful|
|00002420| 6c 6e 61 6d 65 20 70 6f | 72 74 69 6f 6e 2e 0a 20 |lname po|rtion.. |
|00002430| 20 20 20 20 2a 20 22 65 | 6e 64 5f 66 69 65 6c 64 | * "e|nd_field|
|00002440| 22 20 61 63 74 75 61 6c | 6c 79 20 70 6f 69 6e 74 |" actual|ly point|
|00002450| 73 20 6f 6e 65 20 62 65 | 79 6f 6e 64 20 74 68 65 |s one be|yond the|
|00002460| 20 65 6e 64 20 6f 66 20 | 74 68 65 20 66 69 65 6c | end of |the fiel|
|00002470| 64 2e 0a 20 20 20 20 20 | 2a 2f 0a 20 20 20 20 62 |d.. |*/. b|
|00002480| 65 67 5f 66 69 65 6c 64 | 20 3d 20 65 6e 64 5f 66 |eg_field| = end_f|
|00002490| 69 65 6c 64 20 3d 20 62 | 75 66 3b 0a 20 20 20 20 |ield = b|uf;. |
|000024a0| 77 68 69 6c 65 20 28 2a | 62 75 66 20 21 3d 20 27 |while (*|buf != '|
|000024b0| 3c 27 20 26 26 20 2a 62 | 75 66 20 21 3d 20 27 5c |<' && *b|uf != '\|
|000024c0| 30 27 20 26 26 20 2a 62 | 75 66 20 21 3d 20 27 2c |0' && *b|uf != ',|
|000024d0| 27 29 20 7b 0a 09 74 6c | 65 6e 20 3d 20 72 66 63 |') {..tl|en = rfc|
|000024e0| 38 32 32 5f 74 6f 6b 6c | 65 6e 28 62 75 66 29 3b |822_tokl|en(buf);|
|000024f0| 0a 0a 09 2f 2a 0a 09 20 | 2a 20 42 79 20 75 70 64 |.../*.. |* By upd|
|00002500| 61 74 69 6e 67 20 22 65 | 6e 64 5f 66 69 65 6c 64 |ating "e|nd_field|
|00002510| 22 20 6f 6e 6c 79 20 6f | 6e 20 6e 6f 6e 2d 73 70 |" only o|n non-sp|
|00002520| 61 63 65 20 74 6f 6b 65 | 6e 73 20 77 65 20 65 6e |ace toke|ns we en|
|00002530| 73 75 72 65 0a 09 20 2a | 20 74 68 61 74 20 77 68 |sure.. *| that wh|
|00002540| 65 6e 20 77 65 20 63 6f | 70 79 20 62 65 67 5f 66 |en we co|py beg_f|
|00002550| 69 65 6c 64 2d 3e 65 6e | 64 5f 66 69 65 6c 64 20 |ield->en|d_field |
|00002560| 74 72 61 69 6c 69 6e 67 | 20 77 68 69 74 65 73 70 |trailing| whitesp|
|00002570| 61 63 65 0a 09 20 2a 20 | 77 69 6c 6c 20 62 65 20 |ace.. * |will be |
|00002580| 65 6c 69 64 65 64 2e 0a | 09 20 2a 2f 0a 09 69 66 |elided..|. */..if|
|00002590| 20 28 21 69 73 73 70 61 | 63 65 28 2a 62 75 66 29 | (!isspa|ce(*buf)|
|000025a0| 29 20 7b 0a 09 20 20 20 | 20 62 75 66 20 2b 3d 20 |) {.. | buf += |
|000025b0| 74 6c 65 6e 3b 0a 09 20 | 20 20 20 65 6e 64 5f 66 |tlen;.. | end_f|
|000025c0| 69 65 6c 64 20 3d 20 62 | 75 66 3b 0a 09 7d 20 65 |ield = b|uf;..} e|
|000025d0| 6c 73 65 20 7b 0a 09 20 | 20 20 20 62 75 66 20 2b |lse {.. | buf +|
|000025e0| 3d 20 74 6c 65 6e 3b 0a | 09 7d 0a 20 20 20 20 7d |= tlen;.|.}. }|
|000025f0| 0a 20 20 20 20 69 66 20 | 28 2a 62 75 66 20 21 3d |. if |(*buf !=|
|00002600| 20 27 3c 27 29 0a 09 72 | 65 74 75 72 6e 20 2d 31 | '<')..r|eturn -1|
|00002610| 3b 0a 0a 20 20 20 20 2f | 2a 0a 20 20 20 20 20 2a |;.. /|*. *|
|00002620| 20 49 66 20 74 68 65 72 | 65 20 69 73 20 61 20 66 | If ther|e is a f|
|00002630| 75 6c 6c 6e 61 6d 65 20 | 66 69 65 6c 64 20 74 68 |ullname |field th|
|00002640| 65 6e 20 73 61 76 65 20 | 69 74 20 6f 66 66 2c 20 |en save |it off, |
|00002650| 65 6c 73 65 20 73 65 74 | 20 74 68 65 20 72 65 73 |else set| the res|
|00002660| 75 6c 74 0a 20 20 20 20 | 20 2a 20 74 6f 20 61 6e |ult. | * to an|
|00002670| 20 65 6d 70 74 79 20 73 | 74 72 69 6e 67 2e 20 20 | empty s|tring. |
|00002680| 41 6c 73 6f 20 72 65 74 | 75 72 6e 20 61 6e 20 65 |Also ret|urn an e|
|00002690| 6d 70 74 79 20 73 74 72 | 69 6e 67 20 69 66 20 74 |mpty str|ing if t|
|000026a0| 68 65 20 62 75 66 66 65 | 72 20 69 73 6e 27 74 0a |he buffe|r isn't.|
|000026b0| 20 20 20 20 20 2a 20 62 | 69 67 20 65 6e 6f 75 67 | * b|ig enoug|
|000026c0| 68 2e 20 20 54 68 61 74 | 27 73 20 62 65 63 61 75 |h. That|'s becau|
|000026d0| 73 65 20 69 66 20 77 65 | 20 6f 6e 6c 79 20 73 74 |se if we| only st|
|000026e0| 6f 72 65 64 20 6f 66 66 | 20 61 20 70 6f 72 74 69 |ored off| a porti|
|000026f0| 6f 6e 2c 20 77 65 0a 20 | 20 20 20 20 2a 20 63 6f |on, we. | * co|
|00002700| 75 6c 64 20 65 6e 64 20 | 75 70 20 77 69 74 68 20 |uld end |up with |
|00002710| 73 6f 6d 65 74 68 69 6e | 67 20 6c 69 6b 65 20 75 |somethin|g like u|
|00002720| 6e 62 61 6c 61 6e 63 65 | 64 20 71 75 6f 74 65 73 |nbalance|d quotes|
|00002730| 2e 0a 20 20 20 20 20 2a | 2f 0a 20 20 20 20 69 66 |.. *|/. if|
|00002740| 20 28 72 65 74 5f 6e 61 | 6d 65 20 21 3d 20 4e 55 | (ret_na|me != NU|
|00002750| 4c 4c 29 20 7b 0a 09 77 | 20 3d 20 65 6e 64 5f 66 |LL) {..w| = end_f|
|00002760| 69 65 6c 64 20 2d 20 62 | 65 67 5f 66 69 65 6c 64 |ield - b|eg_field|
|00002770| 3b 0a 09 69 66 20 28 77 | 20 3c 3d 20 30 20 7c 7c |;..if (w| <= 0 |||
|00002780| 20 77 20 3e 3d 20 6c 65 | 6e 5f 6e 61 6d 65 29 0a | w >= le|n_name).|
|00002790| 09 20 20 20 20 2a 72 65 | 74 5f 6e 61 6d 65 20 3d |. *re|t_name =|
|000027a0| 20 27 5c 30 27 3b 0a 09 | 65 6c 73 65 20 7b 0a 09 | '\0';..|else {..|
|000027b0| 20 20 20 20 69 66 20 28 | 2a 62 65 67 5f 66 69 65 | if (|*beg_fie|
|000027c0| 6c 64 20 3d 3d 20 27 22 | 27 20 26 26 20 66 75 6c |ld == '"|' && ful|
|000027d0| 6c 6e 61 6d 65 5f 69 73 | 5f 71 75 6f 74 65 64 28 |lname_is|_quoted(|
|000027e0| 62 65 67 5f 66 69 65 6c | 64 2c 20 77 29 29 20 7b |beg_fiel|d, w)) {|
|000027f0| 0a 09 09 2b 2b 62 65 67 | 5f 66 69 65 6c 64 3b 0a |...++beg|_field;.|
|00002800| 09 09 77 20 2d 3d 20 32 | 3b 0a 09 20 20 20 20 7d |..w -= 2|;.. }|
|00002810| 0a 09 20 20 20 20 28 76 | 6f 69 64 29 20 73 74 72 |.. (v|oid) str|
|00002820| 66 63 70 79 28 72 65 74 | 5f 6e 61 6d 65 2c 20 62 |fcpy(ret|_name, b|
|00002830| 65 67 5f 66 69 65 6c 64 | 2c 20 77 2b 31 29 3b 0a |eg_field|, w+1);.|
|00002840| 09 7d 0a 20 20 20 20 7d | 0a 0a 20 20 20 20 2f 2a |.}. }|.. /*|
|00002850| 0a 20 20 20 20 20 2a 20 | 4c 6f 63 61 74 65 20 74 |. * |Locate t|
|00002860| 68 65 20 66 72 6f 6e 74 | 20 61 6e 64 20 62 61 63 |he front| and bac|
|00002870| 6b 20 6f 66 20 74 68 65 | 20 61 64 64 72 65 73 73 |k of the| address|
|00002880| 20 66 69 65 6c 64 2e 0a | 20 20 20 20 20 2a 20 22 | field..| * "|
|00002890| 65 6e 64 5f 66 69 65 6c | 64 22 20 61 63 74 75 61 |end_fiel|d" actua|
|000028a0| 6c 6c 79 20 70 6f 69 6e | 74 73 20 6f 6e 65 20 62 |lly poin|ts one b|
|000028b0| 65 79 6f 6e 64 20 74 68 | 65 20 65 6e 64 20 6f 66 |eyond th|e end of|
|000028c0| 20 74 68 65 20 66 69 65 | 6c 64 2e 0a 20 20 20 20 | the fie|ld.. |
|000028d0| 20 2a 2f 0a 20 20 20 20 | 62 65 67 5f 66 69 65 6c | */. |beg_fiel|
|000028e0| 64 20 3d 20 2b 2b 62 75 | 66 3b 0a 20 20 20 20 77 |d = ++bu|f;. w|
|000028f0| 68 69 6c 65 20 28 2a 62 | 75 66 20 21 3d 20 27 3e |hile (*b|uf != '>|
|00002900| 27 20 26 26 20 2a 62 75 | 66 20 21 3d 20 27 5c 30 |' && *bu|f != '\0|
|00002910| 27 29 0a 09 62 75 66 20 | 2b 3d 20 72 66 63 38 32 |')..buf |+= rfc82|
|00002920| 32 5f 74 6f 6b 6c 65 6e | 28 62 75 66 29 3b 0a 20 |2_toklen|(buf);. |
|00002930| 20 20 20 69 66 20 28 2a | 62 75 66 20 21 3d 20 27 | if (*|buf != '|
|00002940| 3e 27 29 0a 09 72 65 74 | 75 72 6e 20 2d 31 3b 0a |>')..ret|urn -1;.|
|00002950| 20 20 20 20 65 6e 64 5f | 66 69 65 6c 64 20 3d 20 | end_|field = |
|00002960| 62 75 66 3b 0a 0a 20 20 | 20 20 2f 2a 0a 20 20 20 |buf;.. | /*. |
|00002970| 20 20 2a 20 43 61 6c 63 | 75 6c 61 74 65 20 74 68 | * Calc|ulate th|
|00002980| 65 20 6c 65 6e 67 74 68 | 20 6f 66 20 74 68 65 20 |e length| of the |
|00002990| 61 64 64 72 65 73 73 20 | 61 6e 64 20 73 61 76 65 |address |and save|
|000029a0| 20 6f 66 66 20 74 68 65 | 20 72 65 73 75 6c 74 2e | off the| result.|
|000029b0| 0a 20 20 20 20 20 2a 2f | 0a 20 20 20 20 69 66 20 |. */|. if |
|000029c0| 28 28 77 20 3d 20 65 6e | 64 5f 66 69 65 6c 64 20 |((w = en|d_field |
|000029d0| 2d 20 62 65 67 5f 66 69 | 65 6c 64 29 20 3c 3d 20 |- beg_fi|eld) <= |
|000029e0| 30 29 0a 09 72 65 74 75 | 72 6e 20 2d 31 3b 0a 20 |0)..retu|rn -1;. |
|000029f0| 20 20 20 69 66 20 28 72 | 65 74 5f 61 64 64 72 20 | if (r|et_addr |
|00002a00| 21 3d 20 4e 55 4c 4c 29 | 20 7b 0a 09 69 66 20 28 |!= NULL)| {..if (|
|00002a10| 77 20 3e 20 6c 65 6e 5f | 61 64 64 72 29 0a 09 20 |w > len_|addr).. |
|00002a20| 20 20 20 72 65 74 75 72 | 6e 20 2d 31 3b 0a 09 28 | retur|n -1;..(|
|00002a30| 76 6f 69 64 29 20 73 74 | 72 66 63 70 79 28 72 65 |void) st|rfcpy(re|
|00002a40| 74 5f 61 64 64 72 2c 20 | 62 65 67 5f 66 69 65 6c |t_addr, |beg_fiel|
|00002a50| 64 2c 20 77 2b 31 29 3b | 0a 20 20 20 20 7d 0a 0a |d, w+1);|. }..|
|00002a60| 20 20 20 20 2f 2a 0a 20 | 20 20 20 20 2a 20 54 68 | /*. | * Th|
|00002a70| 65 72 65 20 73 68 6f 75 | 6c 64 6e 27 74 20 62 65 |ere shou|ldn't be|
|00002a80| 20 61 6e 79 74 68 69 6e | 67 20 62 75 74 20 63 6f | anythin|g but co|
|00002a90| 6d 6d 65 6e 74 73 20 61 | 6e 64 20 77 68 69 74 65 |mments a|nd white|
|00002aa0| 73 70 61 63 65 20 6c 65 | 66 74 2e 0a 20 20 20 20 |space le|ft.. |
|00002ab0| 20 2a 2f 0a 20 20 20 20 | 2b 2b 62 75 66 3b 0a 20 | */. |++buf;. |
|00002ac0| 20 20 20 77 68 69 6c 65 | 20 28 69 73 73 70 61 63 | while| (isspac|
|00002ad0| 65 28 2a 62 75 66 29 20 | 7c 7c 20 2a 62 75 66 20 |e(*buf) ||| *buf |
|00002ae0| 3d 3d 20 27 28 27 29 20 | 2f 2a 29 2a 2f 0a 09 62 |== '(') |/*)*/..b|
|00002af0| 75 66 20 2b 3d 20 72 66 | 63 38 32 32 5f 74 6f 6b |uf += rf|c822_tok|
|00002b00| 6c 65 6e 28 62 75 66 29 | 3b 0a 20 20 20 20 69 66 |len(buf)|;. if|
|00002b10| 20 28 2a 62 75 66 20 21 | 3d 20 27 5c 30 27 20 26 | (*buf !|= '\0' &|
|00002b20| 26 20 2a 62 75 66 20 21 | 3d 20 27 2c 27 29 0a 09 |& *buf !|= ',')..|
|00002b30| 72 65 74 75 72 6e 20 2d | 31 3b 0a 0a 20 20 20 20 |return -|1;.. |
|00002b40| 2f 2a 0a 20 20 20 20 20 | 2a 20 53 61 76 65 20 6f |/*. |* Save o|
|00002b50| 66 66 20 70 6f 69 6e 74 | 65 72 20 74 6f 20 6e 65 |ff point|er to ne|
|00002b60| 78 74 20 6d 61 69 6c 62 | 6f 78 20 66 69 65 6c 64 |xt mailb|ox field|
|00002b70| 2e 0a 20 20 20 20 20 2a | 2f 0a 20 20 20 20 69 66 |.. *|/. if|
|00002b80| 20 28 6e 65 78 74 5f 66 | 69 65 6c 64 20 21 3d 20 | (next_f|ield != |
|00002b90| 4e 55 4c 4c 29 0a 09 2a | 6e 65 78 74 5f 66 69 65 |NULL)..*|next_fie|
|00002ba0| 6c 64 20 3d 20 28 63 68 | 61 72 20 2a 29 20 62 75 |ld = (ch|ar *) bu|
|00002bb0| 66 20 2b 20 28 2a 62 75 | 66 20 3d 3d 20 27 2c 27 |f + (*bu|f == ','|
|00002bc0| 20 3f 20 31 20 3a 20 30 | 29 3b 0a 0a 20 20 20 20 | ? 1 : 0|);.. |
|00002bd0| 72 65 74 75 72 6e 20 30 | 3b 0a 7d 0a 0a 0a 2f 2f |return 0|;.}...//|
|00002be0| 69 6e 74 20 64 65 62 75 | 67 20 3d 20 30 3b 0a 2f |int debu|g = 0;./|
|00002bf0| 2a 20 20 6d 61 69 6e 28 | 29 20 2a 2f 0a 2f 2a 20 |* main(|) */./* |
|00002c00| 20 7b 20 2a 2f 0a 2f 2a | 20 20 20 20 20 20 63 68 | { */./*| ch|
|00002c10| 61 72 20 62 75 66 5b 32 | 35 36 5d 2c 20 61 62 75 |ar buf[2|56], abu|
|00002c20| 66 5b 31 32 38 5d 2c 20 | 6e 62 75 66 5b 31 32 38 |f[128], |nbuf[128|
|00002c30| 5d 2c 20 2a 63 66 2c 20 | 2a 6e 66 3b 20 2a 2f 0a |], *cf, |*nf; */.|
|00002c40| 2f 2a 20 20 20 20 20 20 | 69 6e 74 20 72 63 3b 20 |/* |int rc; |
|00002c50| 2a 2f 0a 0a 2f 2a 20 20 | 20 20 20 20 66 70 75 74 |*/../* | fput|
|00002c60| 73 28 22 45 6e 74 65 72 | 20 61 64 64 72 65 73 73 |s("Enter| address|
|00002c70| 20 6c 69 73 74 2c 20 6f | 6e 65 20 70 65 72 20 6c | list, o|ne per l|
|00002c80| 69 6e 65 2e 20 20 45 4f | 46 20 74 6f 20 74 65 72 |ine. EO|F to ter|
|00002c90| 6d 69 6e 61 74 65 5c 6e | 22 2c 20 73 74 64 65 72 |minate\n|", stder|
|00002ca0| 72 29 3b 20 2a 2f 0a 0a | 2f 2a 20 20 20 20 20 20 |r); */..|/* |
|00002cb0| 77 68 69 6c 65 20 28 67 | 65 74 73 28 62 75 66 29 |while (g|ets(buf)|
|00002cc0| 20 21 3d 20 4e 55 4c 4c | 29 20 7b 20 2a 2f 0a 2f | != NULL|) { */./|
|00002cd0| 2a 20 20 09 63 66 20 3d | 20 62 75 66 3b 20 2a 2f |* .cf =| buf; */|
|00002ce0| 0a 2f 2a 20 20 09 77 68 | 69 6c 65 20 28 2a 63 66 |./* .wh|ile (*cf|
|00002cf0| 20 21 3d 20 27 5c 30 27 | 29 20 7b 20 2a 2f 0a 2f | != '\0'|) { */./|
|00002d00| 2a 20 20 09 20 20 20 20 | 72 63 20 3d 20 70 61 72 |* . |rc = par|
|00002d10| 73 65 5f 61 72 70 61 5f | 6d 61 69 6c 62 6f 78 28 |se_arpa_|mailbox(|
|00002d20| 63 66 2c 20 61 62 75 66 | 2c 20 73 69 7a 65 6f 66 |cf, abuf|, sizeof|
|00002d30| 28 61 62 75 66 29 2c 20 | 2a 2f 0a 2f 2a 20 20 09 |(abuf), |*/./* .|
|00002d40| 09 6e 62 75 66 2c 20 73 | 69 7a 65 6f 66 28 6e 62 |.nbuf, s|izeof(nb|
|00002d50| 75 66 29 2c 20 26 6e 66 | 29 3b 20 2a 2f 0a 2f 2a |uf), &nf|); */./*|
|00002d60| 20 20 09 20 20 20 20 69 | 66 20 28 72 63 20 3c 20 | . i|f (rc < |
|00002d70| 30 29 20 2a 2f 0a 2f 2a | 20 20 09 09 70 72 69 6e |0) */./*| ..prin|
|00002d80| 74 66 28 22 69 6c 6c 65 | 67 61 6c 20 6d 61 69 6c |tf("ille|gal mail|
|00002d90| 62 6f 78 3a 20 25 2e 2a | 73 5c 6e 22 2c 20 28 6e |box: %.*|s\n", (n|
|00002da0| 66 2d 63 66 29 2c 20 62 | 75 66 29 3b 20 2a 2f 0a |f-cf), b|uf); */.|
|00002db0| 2f 2a 20 20 09 20 20 20 | 20 65 6c 73 65 20 2a 2f |/* . | else */|
|00002dc0| 0a 2f 2a 20 20 09 09 70 | 72 69 6e 74 66 28 22 61 |./* ..p|rintf("a|
|00002dd0| 64 64 72 3d 7c 25 73 7c | 20 6e 61 6d 65 3d 7c 25 |ddr=|%s|| name=|%|
|00002de0| 73 7c 5c 6e 22 2c 20 61 | 62 75 66 2c 20 6e 62 75 |s|\n", a|buf, nbu|
|00002df0| 66 29 3b 20 2a 2f 0a 2f | 2a 20 20 09 20 20 20 20 |f); */./|* . |
|00002e00| 63 66 20 3d 20 6e 66 3b | 20 2a 2f 0a 2f 2a 20 20 |cf = nf;| */./* |
|00002e10| 09 7d 20 2a 2f 0a 2f 2a | 20 20 20 20 20 20 7d 20 |.} */./*| } |
|00002e20| 2a 2f 0a 0a 2f 2a 20 20 | 20 20 20 20 65 78 69 74 |*/../* | exit|
|00002e30| 28 30 29 3b 20 2a 2f 0a | 2f 2a 20 20 7d 20 2a 2f |(0); */.|/* } */|
|00002e40| 0a 0a 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e80| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00002e90| 54 68 69 73 20 72 65 73 | 6f 75 72 63 65 20 66 6f |This res|ource fo|
|00002ea0| 72 6b 20 69 6e 74 65 6e | 74 69 6f 6e 61 6c 6c 79 |rk inten|tionally|
|00002eb0| 20 6c 65 66 74 20 62 6c | 61 6e 6b 20 20 20 00 00 | left bl|ank ..|
|00002ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f80| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00002f90| 00 00 00 00 00 00 00 00 | 00 1c 00 1e ff ff 00 00 |........|........|
|00002fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+